package com.hoshiibuy.purchase.feign;

import com.hoshiibuy.common.rpc.Response;
import com.hoshiibuy.purchase.feign.hystrix.HystrixCompanyFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "hoshiibuy-company", fallback = HystrixCompanyFeignFallback.class)
public interface CompanyService {

    @GetMapping(value = "/company/{id}")
    Response getById(@PathVariable("id") Long id);

    @GetMapping(value = "/department/{id}")
    Response getComDepartmentsById(@PathVariable("id") Long id);

    @GetMapping(value = "/attachtype/{id}")
    Response getAttachById(@PathVariable("id") Long id);

    @GetMapping(value = "/settele/{id}")
    Response getSetteleById(@PathVariable("id") Long id);
}
